package com.igeekhome.pojo;

import org.springframework.stereotype.Component;

@Component("customer") //使用注解，在spring类路径扫描时，产生一个对像，对像名叫customer
public class Customer {

    private String name;
    private String  id;
    /**
     * 构造方法，new Customer()时，就会调用 的方法
     */
    public Customer() {
        System.out.println("Customer() ");
    }

    public Customer(String name, String id) {
        this.name = name;
        this.id = id;
    }
    @Override
    public String toString() {
        return "Customer{" +
                "name='" + name + '\'' +
                ", id='" + id + '\'' +
                '}';
    }
    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }
}
